Skip to content

Update endpoint pattern regex for long TLD#9456

Merged
necusjz merged 8 commits intoAzure:mainfrom
itsjayway:feature/relax-measurementendpoint-regex
Dec 14, 2025
Merged

Update endpoint pattern regex for long TLD#9456
necusjz merged 8 commits intoAzure:mainfrom
itsjayway:feature/relax-measurementendpoint-regex

Conversation

@itsjayway
Copy link
Copy Markdown
Contributor

@itsjayway itsjayway commented Dec 5, 2025

2,5 was too limiting for evolving customer requirements (i.e. '.microsoft'). removing the upper bound for TLD length


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
image image
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
image

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

2,5 was too limiting for evolving customer requirements (i.e. '.microsoft'). removing the upper bound for TLD length
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Dec 5, 2025

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @itsjayway,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Dec 5, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 5, 2025

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 5, 2025

Hi @itsjayway

⚠️ Release Requirements

Module: footprint

  • ⚠️ Please update VERSION to be 1.0.1b1 in src/footprint/setup.py

Notes

@itsjayway itsjayway marked this pull request as ready for review December 5, 2025 19:55
Copilot AI review requested due to automatic review settings December 5, 2025 19:55
@github-actions github-actions bot added the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Dec 5, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the endpoint pattern regex to support longer top-level domains (TLDs) by removing the upper bound restriction, and updates the Azure Footprint Monitoring Management API from version 2020-02-01-preview to 2024-09-16-preview.

Key Changes:

  • Regex pattern update: Changed TLD length from {2,5} to {2,} to support long TLDs like '.microsoft'
  • API version bump across all operation files from 2020-02-01-preview to 2024-09-16-preview
  • Extension version bump from 1.0.0 to 1.0.1

Reviewed changes

Copilot reviewed 34 out of 93 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/footprint/setup.py Version bump to 1.0.1
src/footprint/azext_footprint/manual/version.py Version bump to 1.0.1
src/footprint/HISTORY.rst Added changelog entry for version 1.0.1
src/footprint/azext_footprint/vendored_sdks/footprint/models/_models.py Updated endpoint regex pattern from {2,5} to {2,} for TLD length
Operation files (sync/async) Updated API version to 2024-09-16-preview across all operation modules
Client configuration files Updated API version to 2024-09-16-preview
src/footprint/azext_footprint/tests/latest/recordings/test_footprint.yaml Updated test recordings with new API version
azdev_env/* Virtual environment files that should not be committed

Comment thread src/footprint/HISTORY.rst
Comment thread azdev_env/pyvenv.cfg Outdated
@yonzhan yonzhan requested review from jsntcy and necusjz December 6, 2025 00:28
@yonzhan yonzhan requested a review from kairu-ms December 6, 2025 00:28
@necusjz
Copy link
Copy Markdown
Member

necusjz commented Dec 8, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

Comment thread src/footprint/HISTORY.rst Outdated
Comment thread src/footprint/setup.py
@itsjayway
Copy link
Copy Markdown
Contributor Author

itsjayway commented Dec 9, 2025

Hey @necusjz, thanks for your review. Could you provide guidance in resolving the errors preventing merge?

  • Release Version Calculation / version-output (pull_request_target) Failing after 11s
  • Merging is blocked
    At least 1 approving review is required by reviewers with write access.
    You're not authorized to push to this branch. <----

@itsjayway itsjayway force-pushed the feature/relax-measurementendpoint-regex branch from 7ad232b to 6ed3d3b Compare December 9, 2025 15:52
@necusjz necusjz removed the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Dec 10, 2025
@necusjz
Copy link
Copy Markdown
Member

necusjz commented Dec 10, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

'name': {'readonly': True},
'type': {'readonly': True},
'endpoint_id': {'readonly': True, 'max_length': 32, 'min_length': 32, 'pattern': r'[a-f0-9]{32}'},
'endpoint': {'required': True, 'max_length': 1024, 'min_length': 0, 'pattern': r'^[a-z0-9\*]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?$'},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is applied in SDK, but not in CLI extension?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your review @jsntcy. This change needs to be done in both places. Our requests go to RPaaS whose specification can be found here https://github.com/Azure/azure-rest-api-specs-pr/blob/RPSaaSMaster/specification/footprintmonitoring/resource-manager/Microsoft.FootprintMonitoring/preview/2024-09-16-preview/footprintProfiles.json#L1375C11-L1375C87

Is there an additional path that I'm missing?

@necusjz necusjz merged commit 18bf50c into Azure:main Dec 14, 2025
35 of 36 checks passed
@azclibot
Copy link
Copy Markdown
Collaborator

[Release] Update index.json for extension [ footprint-1.0.1b1 ] : https://dev.azure.com/msazure/One/_build/results?buildId=146641489&view=results

DhritiJindal27 pushed a commit to DhritiJindal27/azure-cli-extensions that referenced this pull request Dec 18, 2025
* Update endpoint pattern regex for long TLD

2,5 was too limiting for evolving customer requirements (i.e. '.microsoft'). removing the upper bound for TLD length

* change api-version to 2024-09-16-preview from 2024-09-16-preview

* updated test

* updates as per PR guidance

* remove venv

* match version witth setup.py and sort history.rst by latest first

* change release description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants